Print current source names (snapshot list & show)#417
Closed
winged wants to merge 3 commits intoaptly-dev:masterfrom
Closed
Print current source names (snapshot list & show)#417winged wants to merge 3 commits intoaptly-dev:masterfrom
winged wants to merge 3 commits intoaptly-dev:masterfrom
Conversation
added 2 commits
November 10, 2016 09:07
When renaming a snapshot that was referenced by another via snapshot merge, then the references are not updated. Consider the following: $ aptly snapshot create foo from repo xyz $ aptly snapshot merge bar foo $ aptly snapshot list List of snapshots: * [foo]: Snapshot from repo... * [bar]: Merged from sources: 'foo' $ aptly snapshot rename foo foo3 $ aptly snapshot list List of snapshots: * [foo3]: Snapshot from repo... * [bar]: Merged from sources: 'foo' As you can see, after renaming the "source" snapshot, it's stored description may refer to a snapshot that does no longer exist. This change always generates the description from the actual source snapshots, so it will point to the right (current) snapshot name, even after renames.
In the previous commit, we modified "snapshot list" and "snapshot show"
to always output the current names of their source snapshots. In this
change, the same is also done for "publish list".
Now, the snapshots listed in "aptly publish list" are guaranteed to exist, even
if they have been renamed:
$ aptly publish list
Published repositories:
* ./stable [amd64] publishes {main: [foo]: Merged from sources: 'fblub', 'asdfasdf'}
$ aptly snapshot rename asdfasdf foo23
Snapshot asdfasdf -> foo23 has been successfully renamed.
$ aptly publish list
Published repositories:
* ./stable [amd64] publishes {main: [foo]: Merged from sources: 'fblub', 'foo23'}
2acf059 to
21b3e9b
Compare
…with_current_sources
Author
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
When renaming a snapshot that was referenced by another via snapshot merge,
then the references are not updated. Consider the following:
As you can see, after renaming the "source" snapshot, it's stored description
may refer to a snapshot that does no longer exist.
This change always generates the description from the actual source snapshots,
so it will point to the right (current) snapshot name, even after renames.